<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	session.setAttribute("basePath", basePath);
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="${basePath }">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
<title>西普茗茶商品-我的佣金</title>
<meta name="renderer" content="webkit">

<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="https://cdn.bootcss.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css" />
<link href="assets/css/animate.css" rel="stylesheet" type="text/css" />
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link href="https://cdn.bootcss.com/Swiper/3.0.8/css/swiper.min.css" rel="stylesheet" type="text/css" />
<!-- END PAGE LEVEL STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="assets/css/style-metronic.css" rel="stylesheet" type="text/css" />
<link href="assets/css/style.css" rel="stylesheet" type="text/css" />
<link href="assets/css/style-responsive.css" rel="stylesheet" type="text/css" />
<link href="assets/css/plugins.css" rel="stylesheet" type="text/css" />
<link href="assets/css/themes/light.css" rel="stylesheet" type="text/css" id="style_color" />
<link href="assets/css/print.css" rel="stylesheet" type="text/css" media="print" />
<link href="assets/css/custom.css" rel="stylesheet" type="text/css" />
<link href="assets/css/pages/blog.css" rel="stylesheet" type="text/css" />
<link href="css/iconfont.css" rel="stylesheet" type="text/css" />
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico" />

<script type="text/javascript">
	var isHTML5 = true;
</script>
<!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	<script src="js/excanvas.min.js"></script> 
    <script type="text/javascript">
		isHTML5 = false;
	</script>
<![endif]-->
<style type="text/css">
body {
	background: #fef9f3 !important;
}
</style>
</head>
<!--/head-->
<!-- BEGIN BODY -->
<body class="page-footer-fixed">
	<!-- BEGIN HEADER -->
	<div class="header navbar">
		<div class="container-fluid">
			<div class="row">
				<div class="col-xs-2 text-center">
					<a href="./" class="icon_a_link">
						<i style="font-size: 24px; line-height: 40px; height: 40px;" class="iconfont icon-qh-home text-gold">&#xe61a;</i>
					</a>
				</div>
				<div class="col-xs-8 text-center">
					<c:if test="${ param.id==null||param.id==''}">
						<h4>我的佣金</h4>
					</c:if>
					<c:if test="${ param.id!=null&&param.id!=''}">
						<h4>他/她的佣金</h4>
					</c:if>
				</div>
				<div class="col-xs-2 text-center"></div>
			</div>
		</div>
	</div>
	<!-- END HEADER -->
	<div class="clearfix "></div>
	<!-- BEGIN CONTAINER -->
	<div class="page-container">

		<!-- BEGIN CONTENT -->
		<div class="page-content-wrapper">
			<div class="page-content no-space" style="margin-bottom: 50px !important;">
				<div class="well well-sm margin-bottom-10">
					<div class="blog-page no-space">
						<div class="container">
							<div class="row">
								<div class="col-xs-12 text-center ">
									<h1 class="text-red">
										<strong> <fmt:formatNumber value="${commissionDayRecord.currentMonthCommission }" type="currency" pattern="#,##0.##" /></strong>
									</h1>
									<span>本月累计佣金</span>
								</div>
							</div>
						</div>
						<hr style="margin-top: 10px !important; margin-bottom: 10px !important;">
						<div class="container">
							<div class="row">
								<div class="col-xs-3 text-center">
									<a href="javascript:void(0)" class="icon-btn">
										<span class="text-red"><strong><fmt:formatNumber value="${commissionDayRecord.dayCommission }" type="currency" pattern="#,##0.##" /></strong></span>
										<div>昨日佣金</div>
									</a>
								</div>
								<div class="col-xs-3 text-center">
									<a href="javascript:void(0)" class="icon-btn">
										<span class="text-red"><strong>${commissionDayRecord.totalBuyerNumber }</strong></span>
										<div>推荐人数</div>
									</a>
								</div>
								<div class="col-xs-3 text-center">
									<a href="javascript:void(0)" class="icon-btn">
										<span class="text-red"><strong>${commissionDayRecord.dayOrderNumber }</strong></span>
										<div>昨日订单数</div>
									</a>
								</div>
								<div class="col-xs-3 text-center">
									<a href="javascript:void(0)" class="icon-btn">
										<span class="text-red"><strong>${commissionDayRecord.dayGoodsNumber }</strong></span>
										<div>昨日商品数</div>
									</a>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="clearfix margin-top-15"></div>
				<div class="panel-group accordion scrollable " id="accordion2">
					<c:forEach items="${commissionDayRecordList }" var="dr">
						<c:if test="${dr.dayCommission>=0 }">
							<div class="panel panel-default">
								<div class="panel-heading">
									<h4 class="panel-title">
										<a class="accordion-toggle padding-top-15 padding-bottom-10" data-toggle="collapse" data-parent="#accordion2" href="#collapse_${dr.recordId }">
											<i class="fa fa-angle-down pull-right text-light" style="font-size: 30px; margin-top: 0px;"></i> <span class=""><fmt:formatDate value="${dr.recordDate }" pattern="MM月dd日" /></span> <span class="">(佣金：<span
												class="text-red"><fmt:formatNumber value="${dr.dayCommission }" type="currency" pattern="#,##0.##" /></span>)
											</span>
										</a>
									</h4>
								</div>
								<div id="collapse_${dr.recordId }" class="panel-collapse collapse">
									<div class="panel-body">
										<div class="container">
											<div class="row">
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong><fmt:formatNumber value="${dr.dayCommission }" type="currency" pattern="#,##0.##" /></strong></span>
														<div>佣金</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${dr.totalBuyerNumber }</strong></span>
														<div>推荐人数</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${dr.dayOrderNumber }</strong></span>
														<div>订单数</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${dr.dayGoodsNumber }</strong></span>
														<div>商品数</div>
													</a>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</c:if>
					</c:forEach>
					<c:forEach items="${commissionMonthRecordList }" var="mr">
						<c:if test="${mr.monthCommission>=0 }">
							<div class="panel panel-default">
								<div class="panel-heading">
									<h4 class="panel-title">
										<a class="accordion-toggle padding-top-15 padding-bottom-10" data-toggle="collapse" data-parent="#accordion2" href="#collapse_${mr.recordId }">
											<i class="fa fa-angle-down pull-right text-light" style="font-size: 30px; margin-top: 0px;"></i> <span class=""><fmt:formatDate value="${mr.recordMonth }" pattern="M月" /></span> <span class="">(佣金：<span
												class="text-red"><fmt:formatNumber value="${mr.monthCommission }" type="currency" pattern="#,##0.##" /></span>)
											</span>
										</a>
									</h4>
								</div>
								<div id="collapse_${mr.recordId }" class="panel-collapse collapse">
									<div class="panel-body">
										<div class="container">
											<div class="row">
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong><fmt:formatNumber value="${mr.monthCommission }" type="currency" pattern="#,##0.##" /></strong></span>
														<div>佣金</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${mr.totalBuyerNumber }</strong></span>
														<div>推荐人数</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${mr.monthOrderNumber }</strong></span>
														<div>订单数</div>
													</a>
												</div>
												<div class="col-xs-3 text-center">
													<a href="javascript:void(0)" class="icon-btn" style="background: none !important;">
														<span class="text-red"><strong>${mr.monthGoodsNumber }</strong></span>
														<div>商品数</div>
													</a>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</c:if>
					</c:forEach>
				</div>

				<c:if test="${buyerList!=null&&fn:length(buyerList)>0 }">
					<div class="container margin-top-10">
						<h4>我推荐的买家</h4>
						<div class="row margin-top-0 padding-left-5 padding-right-5">
							<c:forEach items="${buyerList }" var="b" varStatus="bStat">
								<div class="col-xs-4 pull-left">
									<div class="thumbnail margin-left-1 margin-right-1 margin-bottom-10" style="box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1); border-radius: 5px !important;">
										<a href="xia_xian_commission?id=${b.buyerId }">
											<c:choose>
												<c:when test="${b.buyerHeadimgurl!=null }">
													<img src="${b.buyerHeadimgurl}" class="img-responsive center-block ">
												</c:when>
												<c:otherwise>
													<img src="images/buyer_default_head_img.jpg" class="img-responsive center-block ">
												</c:otherwise>
											</c:choose>
										</a>
										<div class="caption" style="padding-top: 5px;">
											<p class="text-center">
												<c:choose>
													<c:when test="${b.buyerName!=null }">
														<span><strong>${b.buyerName }</strong></span>
													</c:when>
													<c:otherwise>
														<span><strong>${b.buyerNickname}</strong></span>
													</c:otherwise>
												</c:choose>
											</p>
										</div>
									</div>
								</div>
							</c:forEach>
						</div>
					</div>
				</c:if>
			</div>
			<!-- END CONTAINER -->
		</div>
	</div>

	<!-- BEGIN FOOTER -->
	<div class="footer">
		<div class="container">
			<div class="row">
				<div class="col-xs-3 text-center">
					<a href="./" class="icon-btn">
						<!-- <i class="fa fa-home text-gold"></i> -->
						<i style="font-size: 22px;" class="iconfont text-gold icon-qh-logo">&#xe626;</i>
						<div class="text-gold margin-top-2">首页</div>

					</a>
				</div>
				<div class="col-xs-3 text-center">
					<a href="goods_type/get_shop_goods_type" class="icon-btn">
						<!-- <i class="fa fa-list-ul text-gold"></i> -->
						<i style="font-size: 22px;" class="iconfont text-gold con-qh-all-goods">&#xe622;</i>
						<div class="text-gold margin-top-2">类型</div>
					</a>
				</div>
				<div class="col-xs-3 text-center">
					<a href="cart" class="icon-btn">
						<!-- <i class="fa fa-shopping-cart text-gold"></i> -->
						<i style="font-size: 22px;" class="iconfont text-gold icon-qh-cart">&#xe61b;</i>
						<div class="text-gold margin-top-2">购物车</div>

						<span class="badge badge-important" id="shooping_cart_icon_number"></span>
					</a>
				</div>
				<div class="col-xs-3 text-center">
					<a href="item/infocenter.jsp" class="icon-btn">
						<!-- <i class="fa fa-user text-gold"></i> -->
						<i style="font-size: 22px;" class="iconfont text-gold icon-qh-infocenter">&#xe61d;</i>
						<div class="text-gold margin-top-2">个人中心</div>
					</a>
				</div>
			</div>
		</div>
	</div>
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->
	<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
	<script src="https://cdn.bootcss.com/jquery-migrate/1.2.1/jquery-migrate.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="assets/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
	<script src="assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
	<script src="assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
	<script src="js/wow.min.js"></script>
	<script src="js/bootstrap.file-input.js"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="https://cdn.bootcss.com/Swiper/3.0.8/js/swiper.jquery.min.js"></script>
	<script type="text/javascript" src="assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
	<script type="text/javascript" src="assets/plugins/jquery-validation/localization/messages_zh.js"></script>
	<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>
	<script type="text/javascript" src="assets/plugins/jquery-bootpag/jquery.bootpag.min.js"></script>
	<script type="text/javascript" src="js/jquery.form.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="js/app.js"></script>
	<!-- END PAGE LEVEL SCRIPTS -->

	<script>
		$(function()
		{
			// Initiat WOW JS
			if (isHTML5 == true)
			{
				new WOW().init();
			}
			App.init();

		});
	</script>
	<!-- END JAVASCRIPTS -->
</body>
</html>